﻿using _064.App;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace _064
{
    public partial class Form3 : Form
    {
        public Form3()
        {
            InitializeComponent();
        }
        public Form3(SqlData data)
        {
            InitializeComponent();
            textBox3.Text = data.Code;
            textBox1.Text = data.Name;
            textBox2.Text = data.Pwd;
        }
        private void button1_Click(object sender, EventArgs e)
        {
            //将输入的内容转换成SqlData格式
            SqlData data = new SqlData();
            data.Code = textBox3.Text;
            data.Name = textBox1.Text;
            data.Pwd = textBox2.Text;
            //调用修改数据函数
            new SqlDA().update(data);
        }
    }
}
